package com.jlkf.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jlkf.dao.TblAppMapper;
import com.jlkf.dao.TblCompanyInfoMapper;
import com.jlkf.pojo.TblApp;
import com.jlkf.pojo.TblCompanyInfo;
import com.jlkf.service.SystemSetService;

@Service
public class SystemSetServiceImpl implements SystemSetService{
	@Autowired
	TblCompanyInfoMapper tblCompanyInfoMapper; 
	@Autowired
	TblAppMapper tblAppMapper;
	
	/**
	 * 关于我们、客服电话
	 */
	@Override
	public TblCompanyInfo getInfo() {
		// TODO Auto-generated method stub
		return tblCompanyInfoMapper.selectInfo();
	}

	/**
	 * 更新关于我们、客服电话
	 */
	@Override
	public int updateInfo(TblCompanyInfo companyInfo) {
		// TODO Auto-generated method stub
		return tblCompanyInfoMapper.updateByPrimaryKeySelective(companyInfo);
	}

	/**
	 * 新增关于我们、客服电话
	 */
	@Override
	public int insertInfo(TblCompanyInfo companyInfo) {
		// TODO Auto-generated method stub
		return tblCompanyInfoMapper.insertSelective(companyInfo);
	}

	@Override
	public TblApp getAppInfo() {
		// TODO Auto-generated method stub
		return tblAppMapper.selectInfo();
	}

	@Override
	public int insertAppInfo(TblApp app) {
		// TODO Auto-generated method stub
		return tblAppMapper.insertSelective(app);
	}

	@Override
	public int updateAppInfo(TblApp app) {
		// TODO Auto-generated method stub
		return tblAppMapper.updateByPrimaryKeySelective(app);
	}

}
